package classloader;

public class MyTest9 {

    static {
        System.out.println("MyTest9 static block");
    }
    public static void main(String[] args) {
        System.out.println(Child.b);
    }
}
    //输出：
//MyTest9 static block
//Parent static block
//Child static block
//0


class Parent {
    static int a = 9;

    static {
        System.out.println("Parent static block");
    }
}

class Child extends Parent {
    static int b = 0;

    static {
        System.out.println("Child static block");
    }
}
